import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

import Login from '@/components/Login'
import LoginOtp from '@/components/LoginOtp'
import Register from '@/components/Register'

const routes = [{
        path: '*',
        redirect: '/Login'
    },
    {
        name: 'Login',
        path: '/Login',
        component: Login,
        meta: {
            title: '登录'
        }
    },
    {
        name: 'Register',
        path: '/Register',
        component: Register,
        meta: {
            title: '注册'
        }
    },
    {
        name: 'LoginOtp',
        path: '/LoginOtp',
        component: LoginOtp,
        meta: {
            title: 'OTP登录'
        }
    },
]


const router = new Router({
    // mode: 'history',
    routes: routes
});

export {
    router
};